package com.badlogic.androidgames.util;


import com.badlogic.androidgames.R;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class ResultViewCache {

	private View		baseView;
	private TextView	textViewDesc;
	private TextView	textViewInfo;
	private ImageView	imageViewPhoto;
	private ListButton		buttonPlay;

	public ResultViewCache ( View baseView ) {
		this.baseView = baseView;
	}

	public TextView getTextViewDesc () {
		if ( textViewDesc == null ) {
			textViewDesc = ( TextView ) baseView.findViewById( R.id.resurceDesc );
		}
		return textViewDesc;
	}

	public TextView getTextViewInfo () {
		if ( textViewInfo == null ) {
			textViewInfo = ( TextView ) baseView.findViewById( R.id.resourceInfo );
		}
		return textViewInfo;
	}

	public ImageView getImageViewPhoto () {
		if ( imageViewPhoto == null ) {
			imageViewPhoto = ( ImageView ) baseView.findViewById( R.id.resourceIcon );
		}
		return imageViewPhoto;
	}

	public ListButton getButtonPlay () {
		if ( buttonPlay == null ) {
			buttonPlay = ( ListButton ) baseView.findViewById( R.id.imageButtonListResult );
		}
		return buttonPlay;
	}

}